﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;
using DevExpress.Skins;
using DevExpress.UserSkins;
using DevExpress.XtraSplashScreen;
using Fcdbas.Core.Log;
using Fcdbas.WinUI.Forms;
namespace Fcdbas.WinApp
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            XTrace.UseWinForm();
            //bool update = Fcdbas.Core.Configuration.Config.GetConfig<bool>("AutoUpdate", false);
            //string updateExe = Fcdbas.Core.Configuration.Config.GetConfig<string>("AutoUpdateExe","update.exe");
            //if (update)
            //{
            //    Process proc = Process.Start(updateExe,"false");
            //    proc.WaitForExit();
            //}
            BonusSkins.Register();
            SkinManager.EnableFormSkins();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            LoginForm login = new LoginForm();
            if (login.ShowDialog() == DialogResult.No)
                Application.Exit();
            else
            {
               // SplashScreenManager.ShowForm(typeof(Fcdbas.WinUI.Forms.FndSplashScreen));
                Application.Run(new frmMainForm());
            }
        }
    }
}
